package ${ftl.packageName}.${cgH.moduleName};


import javax.validation.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Table;
import io.swagger.annotations.ApiModelProperty;
<#if "${cgH.isCreateAppOrg}" =="1">
import com.stars.common.base.entity.BaseEntity;
    <#elseif "${cgH.isCreateAppOrg}" =="2">
import com.stars.common.base.entity.BaseCompanyEntity;
    <#elseif "${cgH.isCreateAppOrg}" =="3">
import com.stars.common.base.entity.BaseOrgEntity;
    <#elseif "${cgH.isCreateAppOrg}" =="4">
import com.stars.common.base.entity.BaseAppEntity;
    <#else >
import com.stars.common.base.BaseUUID;
</#if>
/**
 * @Title: ${tc.tableComment}实体
 * @author dj
 * @date ${tc.createTime}
 * @version V1.0
 *
 */
@Data
@Table(name = "${tc.tableName ? upper_case}")
@EqualsAndHashCode(callSuper = false)
public class ${tc.entityName}${tc.entityPostfix} extends <#if "${cgH.isCreateAppOrg}" =="1">BaseEntity<#elseif "${cgH.isCreateAppOrg}" =="2">BaseCompanyEntity<#elseif "${cgH.isCreateAppOrg}" =="3">BaseOrgEntity<#elseif "${cgH.isCreateAppOrg}" =="4">BaseAppEntity<#else>BaseUUID</#if>{

<#list tc.templateFieldConfigList as po>
  <#if "${po.name}" !="id">
	/**${po.comment}*/
    <#if "${po.isNull}" == "1">
    @NotBlank(message="${po.comment}不能为空!")
    </#if>
    <#if "${po.name}" ? contains("_")>
    @Column(name = "${po.name ? upper_case}")
    </#if>
    <#if "${po.type}" == "Date">
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    </#if>
    @ApiModelProperty(value = "${po.comment}",name ="${po.fieldName}")
	private ${po.type} ${po.fieldName};
  </#if>
</#list>


}